package com.zhiyou.factory;

public class Demo {

	public static void main(String[] args) {
		
		/*
		YiDong yiDong = new YiDong();
		yiDong.number = "10086";
		yiDong.call();
		yiDong.sendMsg();
		*/
		
		/*
		Contact contact = new LinTong();
		contact.name = "10086";
		contact.call();
		contact.sendMsg();
		*/
		
		//Factory factory = new Factory();
		//简单工厂模式
		
		Contact contact = Factory.getContact(1);
		contact.call();
		
		
	}

}
